home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…tion Library 1994 January / ARPL-Jan94-Disc2of2-Partner-Edition.iso / Applications / Technical Publishing / Aldus PageMaker 5.0 / Scripts / Recipe < prev    next >
Encoding:
Text File  |  1993-07-27  |  4.0 KB  |  186 lines  |  [TEXT/ttxt]

  1. -- Aldus Corporation 1993
  2. -- Recipe Script
  3.  
  4. -- This script is intended to create a new publication, enter text for a
  5. --     cookie recipe and then turn several non-whole numbers in the
  6. --    recipe into correctly-formatted fractions.  It also enters
  7. --    instructions on how to use the fraction script.
  8.  
  9.  
  10.  
  11. new 1
  12. -- Make sure that publication has standard defaults
  13. alignment left
  14. autoflow off
  15. case normal
  16. color "Black"
  17. colorpalette off
  18. controlpalette off
  19. columnguides 1,0.167
  20. fillandline none,"Black",off,onepoint,off,1.00,false,"Black",off
  21. fillstyle none
  22. font "Times"
  23. fontdrawing dontcare,preserveline
  24. guides on
  25. hyphenation plusdictionary,none,0.5
  26. indents 0,0,0
  27. leading auto
  28. letterspace -5,0,25
  29. linestyle onepoint,false,1,off
  30. lockguides off
  31. masteritems on 
  32. measureunits inches,inches,dontcare
  33. pagenumbers 1,1,false,arabic,""
  34. pageoptions on,on
  35. pagesize 8.5,11
  36. paraoptions 0,0,0,0,0,0,0
  37. paraspace 0,0
  38. position normal
  39. preferences 9,front,normalres,false,false,faster,false,false,false,false,64,256,0.01,0.01
  40. roundedcorners 0
  41. ruleabove off,onepoint,"Black",column,0,0,1.00,false
  42. rulebelow off,onepoint,"Black",column,0,0,1.00,false
  43. ruleoptions auto,auto,false,0
  44. rulers on
  45. scrollbars on
  46. setwidth 100
  47. showerroralert on
  48. size 12
  49. snaptoguides on
  50. snaptorulers off
  51. spaceoptions true,4,proportional,120
  52. stylepalette off
  53. tabs 0
  54. textwrap none,allsides,0.167,0.167,0.167,0.167
  55. toolbox on
  56. track 0
  57. typeoptions 70,58.3,33.3,33.3,0,0
  58. typestyle normal
  59. wordspace 75,100,150
  60. zerolock off
  61.  
  62.  
  63. pagemargins 2i, .75i, 2i, 2i
  64. zeropointreset
  65. guides off
  66. rulers off
  67. view 75                
  68. scroll 4.5i, 3.25i
  69. redraw on
  70.  
  71. box 1.875i, 1i, 6i, 1.5i
  72. fillstyle solid
  73. color "Blue"
  74. deselect
  75. redraw on
  76.  
  77. box 1.875i, 1.5i, 6i, 3.5i
  78. color "Blue"
  79. linestyle onepoint
  80. fillstyle none
  81. deselect
  82. redraw on
  83.  
  84. newstory 2i, 1.25i
  85.  
  86. textenter "Chocolate Chip Cookies
  87. 2 cups of flour
  88. 1-1/2 cups brown sugar
  89. 1/2 cup sugar
  90. 1 cup butter
  91. 2 eggs
  92. 1 teaspoon of vanilla
  93. 1 teaspoon of baking soda
  94. 1 16-ounce bag of chocolate chips"
  95. redraw on
  96.  
  97. textcursor -story
  98. textselect +eol
  99. size 24
  100. typestyle bold
  101. typestyle reverse
  102. paraspace 0, 0p4
  103. textcursor +char
  104. redraw on
  105. textselect +story
  106. size 14
  107. redraw on
  108. selectall
  109. font "Helvetica"
  110. redraw on
  111.  
  112. -- Moves the cursor into position to format the first fraction
  113.  
  114. textcursor -story
  115. textcursor +para
  116. textcursor +eol
  117. textcursor +char
  118. textcursor +word
  119. textcursor +word
  120. textcursor +word
  121. textcursor +word
  122. textcursor +word
  123. textcursor -char
  124.  
  125. -- Formats the first fraction
  126.  
  127. textselect -word
  128. typeoptions 80, 58, 33, 0
  129. position subscript
  130. textcursor -char
  131. textselect +char
  132. textenter "/"
  133. textcursor -char
  134. textselect -word
  135. typeoptions 80, 58, 33, 0
  136. position superscript
  137. textcursor +word
  138. textcursor +word
  139. position normal
  140. redraw on
  141.  
  142. -- Positions cursor for formatting second fraction
  143.  
  144. textcursor +eol
  145. textcursor +char
  146. textcursor +word
  147. textcursor +word
  148. textcursor +word
  149. textcursor -char
  150.  
  151. -- Formats second fraction
  152.  
  153. textselect -word
  154. typeoptions 80, 58, 33, 0
  155. position subscript
  156. textcursor -char
  157. textselect -word
  158. typeoptions 80, 58, 33, 0
  159. position superscript
  160. textcursor +word
  161. textcursor +word
  162. position normal
  163. deselect
  164. -- adjusting position of the textblock
  165. select last left last top
  166. nudge -0.083i -0.083i
  167. deselect
  168. redraw on
  169.  
  170. pagemargins .75i, .75i, .75i, .75i
  171. newstory 2i, 4i
  172. font "Times"
  173. size 12
  174. paraspace 0p6, 0
  175. textenter "This is an example of the way scripts can be used to automate time-consuming tasks.
  176. One of the tasks automated in this example is the formatting of fractions to enhance their appearance.
  177. A script for formatting fractions has been included in PageMaker 5.0.  This script substitutes a non-breaking fraction slash for a standard slash, then changes the numerator to a superscript character and the denominator to a subscript character.  To try it, insert the text cursor just to the right of the fraction below (do not highlight the fraction), then choose \"Run Script...\" from the \"Utilities\Aldus Additions\" menu. Select the script \"Fraction\" and be sure that the radio button \"Run: File\" is checked. Then click  \"OK\" .
  178. "
  179.  
  180. Size 24
  181. alignment center
  182. textenter "12/256"
  183. redraw on
  184.  
  185. --end of script
  186.